<?php
    require('includes/database.php');
    $woid  = $_GET['woid'];
    
    $db = new Database();
    
    $woning = $db->getAllAttribute($woid);
    $liggingen = $db->selectLiggingen($woid);
?>
<html xmlns="http://www.w3.org/1999/xhtml"><head> 
    <title>Funda</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
    <link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
    <div id="logo">
        <img src="img/funda-logo-hp.gif" id="toplogo" alt="toplogo"/>
    </div>
    <div id="balk">
        <ul>
            <li class="active">Woningaanbod</a></li>
            <li>Verkoop</li>
            <li>NVM Makelaars</li>
            <li>Gids</li>
            <li>Verhuizen</li>
            <li>My Funda</li>
        </ul>
    </div>
    <div id="main">
        <div id="details">
            <div id="content">
                <table id="kenmerken">
                    <tr><th colspan="2"><a href="<?php echo "kenmerken.php?woid=".$woid; ?>">Kenmerken</a></th></tr>
                    <?php
                        $i = 0;
                        $keys = array_keys($woning);
                        foreach ($keys as $k) {
                            if(!is_numeric($k)) {
                                echo '<tr><td class="kop">'.$k.'</td><td>'.$woning[$k].'</td></tr>';
                            }
                        }
                        echo '<tr><th colspan="2">Liggingen</th></tr>';
                        foreach ($liggingen as $ligging) {
                                echo '<tr><td colspan="2" class="kop">'.$ligging['liggingname'].'</td></tr>';
                        }
                       
                    ?>
                </table>
            </div>
        </div>
    </div>
</body>
</html>

